<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>书签导航</title>

    <?php if (isset($_SESSION['is_admin']) && $_SESSION['is_admin']): ?>
    <link rel="stylesheet" href="/css/admin.css">
    <?php endif; ?>
    <link rel="stylesheet" href="/css/login.css">
    <link rel="stylesheet" href="/css/base.css">
    <!-- <link rel="stylesheet" href="/css/components.css"> -->
    <link rel="stylesheet" href="/css/footer.css">
    <link rel="stylesheet" href="/css/layout.css">
    <link rel="stylesheet" href="/css/navigation.css">
</head>
<body>
    <div class="background-image"></div>
    <header>
        <div class="container header-container">
            <h1>书签导航</h1>
            <nav>
                <a href="index.php">首页</a>
                <?php if (isset($_SESSION['user_id'])): ?>
                    <?php if ($_SESSION['is_admin']): ?>
                        <a href="index.php?action=edit_bookmark">管理</a>
                    <?php endif; ?>
                    <a href="index.php?action=logout">登出</a>
                <?php else: ?>
                    <a href="index.php?action=login">登录</a>
                <?php endif; ?>
            </nav>
        </div>
    </header>
    <main class="container main-content">
        <?php echo $content; ?>
    </main>
    <footer>
        <div class="container footer-container">
            <p>&copy; 2024 书签导航</p>
        </div>
    </footer>
    <script src="/js/main.js"></script>
</body>
</html>
